package com.ljh.trans.service;

import com.ljh.trans.mapper.LogInfoMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author: Themberfue
 * @date: 2025/3/27 19:21
 * @description:
 */
@Slf4j
@Service
public class LogService {
    @Autowired
    private LogInfoMapper logInfoMapper;

    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public Integer insertLog(String name,String op){
        int res = logInfoMapper.insertLog(name,"用户注册");
//        int a = 10 / 0;
        return res;
    }
}
